import request from '@/utils/request'

export function add(data) {
  return request({
    url: '/${lowerClassName}',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    url: '/${lowerClassName}',
    method: 'delete',
    data
  })
}

export function edit(data) {
  return request({
    url: '/${lowerClassName}',
    method: 'put',
    data
  })
}

export function get${className}(id) {
  return request({
    url: '/${lowerClassName}/' + id,
    method: 'get'
  })
}

export function list${className}(params, page) {
  return request({
    url: '/${lowerClassName}/list/' + page.pageNum + '/' + page.pageSize,
    method: 'get',
    params
  })
}

export function export${className}() {
  return request({
    url: '/${lowerClassName}/export',
    method: 'post',
    responseType: 'blob'
  })
}

export default { add, edit, del, get${className}, list${className}, export${className} }
